package me.liuyu2783.dubbo.sample.dubbo;

import java.util.concurrent.ConcurrentHashMap;

/**
 * me.liuyu2783.dubbo.sample.dubbo
 *
 * @author liuyu2783
 * @date 2020-3-3
 */
public class LocalRegister {

    public static ConcurrentHashMap<String,Class> registMap = new ConcurrentHashMap();

    /**
     * 本地注册
     * @param name
     * @param implClass
     */
    public static final void regist(String name, Class implClass){
        registMap.put(name,implClass);
    }

    /**
     * 本地获取
     * @param name
     * @return
     */
    public static final Class getByName(String name){
        return registMap.get(name);
    }

}
